home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / moving / bitdemo1.frm < prev    next >
Text File  |  1995-06-17  |  19KB  |  582 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "BitBlt and Sprite Example"
  5.    ClientHeight    =   6045
  6.    ClientLeft      =   390
  7.    ClientTop       =   645
  8.    ClientWidth     =   5550
  9.    Height          =   6450
  10.    Left            =   330
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   6045
  13.    ScaleWidth      =   5550
  14.    Top             =   300
  15.    Width           =   5670
  16.    Begin CommandButton btnSprites 
  17.       Caption         =   " &Animated Sprites"
  18.       Height          =   375
  19.       Left            =   3720
  20.       TabIndex        =   19
  21.       Top             =   120
  22.       Width           =   1665
  23.    End
  24.    Begin PictureBox picEarthMask 
  25.       AutoRedraw      =   -1  'True
  26.       AutoSize        =   -1  'True
  27.       BorderStyle     =   0  'None
  28.       Height          =   480
  29.       Left            =   5670
  30.       Picture         =   BITDEMO1.FRX:0000
  31.       ScaleHeight     =   32
  32.       ScaleMode       =   3  'Pixel
  33.       ScaleWidth      =   32
  34.       TabIndex        =   18
  35.       Top             =   360
  36.       Width           =   480
  37.    End
  38.    Begin PictureBox picEarthSprites 
  39.       AutoRedraw      =   -1  'True
  40.       AutoSize        =   -1  'True
  41.       BorderStyle     =   0  'None
  42.       Height          =   480
  43.       Left            =   5670
  44.       Picture         =   BITDEMO1.FRX:027A
  45.       ScaleHeight     =   32
  46.       ScaleMode       =   3  'Pixel
  47.       ScaleWidth      =   256
  48.       TabIndex        =   17
  49.       Top             =   960
  50.       Width           =   3840
  51.    End
  52.    Begin CheckBox chkFlickerless 
  53.       BackColor       =   &H00C0C0C0&
  54.       Caption         =   "Flickerless"
  55.       Height          =   255
  56.       Left            =   3930
  57.       TabIndex        =   12
  58.       Top             =   5220
  59.       Value           =   1  'Checked
  60.       Width           =   1395
  61.    End
  62.    Begin CheckBox chkAutoRedraw 
  63.       BackColor       =   &H00C0C0C0&
  64.       Caption         =   "AutoRedraw"
  65.       Height          =   255
  66.       Left            =   3930
  67.       TabIndex        =   11
  68.       Top             =   4950
  69.       Value           =   1  'Checked
  70.       Width           =   1395
  71.    End
  72.    Begin PictureBox picWork 
  73.       AutoRedraw      =   -1  'True
  74.       AutoSize        =   -1  'True
  75.       BorderStyle     =   0  'None
  76.       Height          =   675
  77.       Left            =   2700
  78.       ScaleHeight     =   45
  79.       ScaleMode       =   3  'Pixel
  80.       ScaleWidth      =   45
  81.       TabIndex        =   10
  82.       Top             =   5100
  83.       Visible         =   0   'False
  84.       Width           =   675
  85.    End
  86.    Begin HScrollBar HScroll1 
  87.       Height          =   255
  88.       LargeChange     =   12
  89.       Left            =   180
  90.       TabIndex        =   9
  91.       Top             =   4440
  92.       Width           =   4965
  93.    End
  94.    Begin VScrollBar VScroll1 
  95.       Height          =   3675
  96.       LargeChange     =   12
  97.       Left            =   5130
  98.       TabIndex        =   8
  99.       Top             =   780
  100.       Width           =   255
  101.    End
  102.    Begin PictureBox picBMP 
  103.       AutoRedraw      =   -1  'True
  104.       AutoSize        =   -1  'True
  105.       Height          =   9030
  106.       Left            =   5670
  107.       Picture         =   BITDEMO1.FRX:12F4
  108.       ScaleHeight     =   600
  109.       ScaleMode       =   3  'Pixel
  110.       ScaleWidth      =   800
  111.       TabIndex        =   7
  112.       Top             =   1560
  113.       Width           =   12030
  114.    End
  115.    Begin CommandButton btnStep 
  116.       Caption         =   "Single &Step"
  117.       Height          =   375
  118.       Left            =   1950
  119.       TabIndex        =   5
  120.       Top             =   120
  121.       Width           =   1665
  122.    End
  123.    Begin CommandButton btnGo 
  124.       Caption         =   "&S&imple Sprites"
  125.       Height          =   375
  126.       Left            =   180
  127.       TabIndex        =   4
  128.       Top             =   120
  129.       Width           =   1665
  130.    End
  131.    Begin PictureBox picSave 
  132.       AutoRedraw      =   -1  'True
  133.       AutoSize        =   -1  'True
  134.       BorderStyle     =   0  'None
  135.       Height          =   750
  136.       Left            =   1860
  137.       ScaleHeight     =   50
  138.       ScaleMode       =   3  'Pixel
  139.       ScaleWidth      =   50
  140.       TabIndex        =   3
  141.       Top             =   5100
  142.       Visible         =   0   'False
  143.       Width           =   750
  144.    End
  145.    Begin Timer Timer1 
  146.       Enabled         =   0   'False
  147.       Interval        =   55
  148.       Left            =   6300
  149.       Top             =   60
  150.    End
  151.    Begin PictureBox PicImage 
  152.       AutoRedraw      =   -1  'True
  153.       AutoSize        =   -1  'True
  154.       BorderStyle     =   0  'None
  155.       Height          =   750
  156.       Left            =   1020
  157.       Picture         =   BITDEMO1.FRX:76A2E
  158.       ScaleHeight     =   50
  159.       ScaleMode       =   3  'Pixel
  160.       ScaleWidth      =   50
  161.       TabIndex        =   2
  162.       Top             =   5100
  163.       Width           =   750
  164.    End
  165.    Begin PictureBox picMask 
  166.       AutoRedraw      =   -1  'True
  167.       AutoSize        =   -1  'True
  168.       BorderStyle     =   0  'None
  169.       Height          =   750
  170.       Left            =   180
  171.       Picture         =   BITDEMO1.FRX:77020
  172.       ScaleHeight     =   50
  173.       ScaleMode       =   3  'Pixel
  174.       ScaleWidth      =   50
  175.       TabIndex        =   1
  176.       Top             =   5100
  177.       Width           =   750
  178.    End
  179.    Begin PictureBox picBackground 
  180.       BackColor       =   &H00FFFFFF&
  181.       Height          =   3675
  182.       Left            =   180
  183.       ScaleHeight     =   243
  184.       ScaleMode       =   3  'Pixel
  185.       ScaleWidth      =   329
  186.       TabIndex        =   0
  187.       Top             =   780
  188.       Width           =   4965
  189.    End
  190.    Begin Timer Timer2 
  191.       Enabled         =   0   'False
  192.       Interval        =   55
  193.       Left            =   6840
  194.       Top             =   60
  195.    End
  196.    Begin Label Label1 
  197.       Alignment       =   2  'Center
  198.       BackStyle       =   0  'Transparent
  199.       Caption         =   "Work"
  200.       ForeColor       =   &H000000C0&
  201.       Height          =   195
  202.       Index           =   3
  203.       Left            =   2670
  204.       TabIndex        =   16
  205.       Top             =   4860
  206.       Width           =   735
  207.    End
  208.    Begin Label Label1 
  209.       Alignment       =   2  'Center
  210.       BackStyle       =   0  'Transparent
  211.       Caption         =   "Saved"
  212.       ForeColor       =   &H000000C0&
  213.       Height          =   195
  214.       Index           =   2
  215.       Left            =   1860
  216.       TabIndex        =   15
  217.       Top             =   4860
  218.       Width           =   735
  219.    End
  220.    Begin Label Label1 
  221.       Alignment       =   2  'Center
  222.       BackStyle       =   0  'Transparent
  223.       Caption         =   "Sprite"
  224.       ForeColor       =   &H000000C0&
  225.       Height          =   195
  226.       Index           =   1
  227.       Left            =   1020
  228.       TabIndex        =   14
  229.       Top             =   4860
  230.       Width           =   735
  231.    End
  232.    Begin Label Label1 
  233.       Alignment       =   2  'Center
  234.       BackStyle       =   0  'Transparent
  235.       Caption         =   "Mask"
  236.       ForeColor       =   &H000000C0&
  237.       Height          =   195
  238.       Index           =   0
  239.       Left            =   150
  240.       TabIndex        =   13
  241.       Top             =   4860
  242.       Width           =   735
  243.    End
  244.    Begin Label lblStep 
  245.       Alignment       =   2  'Center
  246.       BackStyle       =   0  'Transparent
  247.       Height          =   195
  248.       Left            =   1560
  249.       TabIndex        =   6
  250.       Top             =   540
  251.       Width           =   2535
  252.    End
  253. End
  254. Option Explicit
  255. '-----------------------------------------------------
  256. ' BITDEMO1.FRM
  257. ' This program demonstrates some of the methods used
  258. ' to display bitmaps and sprites.
  259. '-----------------------------------------------------
  260.  
  261. ' The number of pixels to offset the sprite
  262. ' each time it is moved.
  263. Const INCREMENT = 3
  264.  
  265. ' Constants for Raster Operations used by BitBlt function.
  266. Const SRCAND = &H8800C6      ' dest = source A